<template>
	<el-row>
		<el-table :data="tableStructData" style="width: 100%" :height="height" ref="structTable">
			<el-table-column prop="name" label="表名"></el-table-column>
			<el-table-column prop="rows" label="行"></el-table-column>
			<el-table-column prop="dataLength" label="数据长度"></el-table-column>
			<el-table-column prop="engine" label="引擎"></el-table-column>
			<el-table-column prop="createTime" label="创建日期"></el-table-column>
			<el-table-column prop="tableCollation" label="排序规则"></el-table-column>
			<el-table-column prop="comment" label="注释"></el-table-column>
		</el-table>
	</el-row>
</template>

<script>
import {mapState} from "vuex";

export default {
	name: "TableStruct",
	computed:{
		...mapState(['tableStructData'])
	},
	data(){
		return {
			height: "500"
		}
	},
	mounted() {
		this.$nextTick(function () {
			this.height = window.innerHeight - this.$refs.structTable.$el.offsetTop - 100;
		});
	}
}
</script>

<style scoped lang="less">

</style>
